﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Core;

namespace GraphControls
{
    public partial class PropertyView : Form
    {
        public IGraphElement element { get; set;}
        private GraphControl _control;
        public PropertyView()
        {
            InitializeComponent();
        }


        public void Initialize(IGraphElement node,GraphControl graphControl)
        {
            propertys1.SetObj(node);
            propertys1.Invalidate();
            _control = graphControl;
        }

        public void Initialize(Project project)
        {
            propertys1.SetObj(project);
        }

       /* private void propertys1_EnabledChanged(object sender, EventArgs e)
        {
            _control.Invalidate();
        }*/

        private void propertys1_Paint(object sender, PaintEventArgs e)
        {
        }

        private void propertys1_EnabledChanged(object sender, EventArgs e)
        {

        }

        private void propertys1_VisibleChanged(object sender, EventArgs e)
        {
            if(_control!= null)
                _control.Invalidate();
        }
    }
}
